package com.fyp.ptma.controllers.service;

import java.io.File;

public class FileHandler extends File {

	public FileHandler(String arg0) {
		super(arg0);

	}

	public boolean delete() {
	 
		if (this.isFile()) {
			super.delete();
		} else {
			for (File file : this.listFiles()) {
				if (file.isFile()) {
					file.delete();
				} else {
					new FileHandler(file.getAbsolutePath()).delete();
				}

			}
			super.delete();
		}
		return true;
	}
}
